package com.fangcun.filter;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @作者： 陳曉鬆 @时间： 2018年5月17日 - 下午4:12:28 @description：->
 */
@Configuration
public class HttpRequestFilter implements WebMvcConfigurer {

	@Autowired
	private SecurityFilter securityFilter;

	/**
	 * 注册 拦截器
	 */
	public void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(securityFilter).addPathPatterns("/**");
		WebMvcConfigurer.super.addInterceptors(registry);
	}

}
